#include <boost/function.hpp>

#include <kuai/misc/error.hpp>
#include <kuai/misc/funcman.hpp>
#include <kuai/sim/studio.hpp>


#ifndef _KUAI_SIM_TRAJEC_H_
#define _KUAI_SIM_TRAJEC_H_

namespace kuai {

	/*
	class TrajecPlayer
		: public SpaceControl
	{ 
	public:
		class EndOfTrajec
			: public BreakJob
		{ 
		public:
			EndOfTrajec(const FileName& filename)
				: BreakJob(error("End of trajec file %1%", filename).what())
			{ }
		};

		/// Return size_t(-1) for end of job and/or the current frame id if 
		/// there are more frames.
		virtual size_t current() = 0;

		/// Update space with next frame 
		virtual void update(PhaseSpace& space, Index tid=0, Index nThreads=1) = 0;

		virtual void open() = 0;
		virtual void close() = 0;
		virtual void seek(size_t frame);

		virtual void set(const String& key, const String& data);
		virtual String get(const String& key) const;

		virtual void start(std::ostream& stdlog, std::ostream& errlog, 
			PhaseSpace& space, std::vector<EnergyFunction*>& efunc, Index tid=0, Index nThreads=1);
		virtual void finish(std::ostream& stdlog, std::ostream& errlog, size_t iStep, 
			PhaseSpace& space, std::vector<EnergyFunction*>& efunc, Index tid=0, Index nThreads=1);
		virtual void act(std::ostream& stdlog, std::ostream& errlog, size_t iStep, 
			PhaseSpace& space, std::vector<EnergyFunction*>& efunc, Index tid=0, Index nThreads=1);

	protected:
		FileName filename;
	};

	class TrajecPlayerFactory
		: public std::map<String, boost::function<TrajecPlayer* ()> >
	{
	private:
		TrajecPlayerFactory();

	public:
		static TrajecPlayerFactory& getInstance();

		static TrajecPlayer* create(const String& type);
	};
	*/


};


#endif
